﻿using System;
using System.Linq;
using System.Text;
using DevExpress.Xpo;
using DevExpress.ExpressApp;
using System.ComponentModel;
using DevExpress.ExpressApp.DC;
using DevExpress.Data.Filtering;
using DevExpress.Persistent.Base;
using System.Collections.Generic;
using DevExpress.ExpressApp.Model;
using DevExpress.Persistent.BaseImpl;
using DevExpress.Persistent.Validation;
using Tida.Module.BusinessObjects.系统管理;

namespace Tida.Module.BusinessObjects.组织架构
{
    [NavigationItem("组织架构")]
    [DefaultClassOptions]
    //[ImageName("BO_Contact")]
    //[DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")]
    //[DefaultListViewOptions(MasterDetailMode.ListViewOnly, false, NewItemRowPosition.None)]
    //[Persistent("DatabaseTableName")]
    // Specify more UI options using a declarative approach (https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument112701).
    [DefaultProperty("名称")]
    public class 岗位 : BaseInf
    { // Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument113146.aspx).
        public 岗位(Session session)
            : base(session)
        {
        }
        public override void AfterConstruction()
        {

            base.AfterConstruction();
            // Place your initialization code here (https://documentation.devexpress.com/eXpressAppFramework/CustomDocument112834.aspx).
        }

        // Fields...
        private decimal _借款金额上限;
        private decimal _单次报销上限;
        private 部门 _部门;
        private string _名称;

        [Size(SizeAttribute.DefaultStringMappingFieldSize)]
        public string 名称
        {
            get
            {
                return _名称;
            }
            set
            {
                SetPropertyValue("名称", ref _名称, value);
            }
        }

        [Association("部门-岗位")]
        public 部门 部门
        {
            get
            {
                return _部门;
            }
            set
            {
                SetPropertyValue("部门", ref _部门, value);
            }
        }


        public decimal 单次报销上限
        {
            get
            {
                return _单次报销上限;
            }
            set
            {
                SetPropertyValue("单次报销上限", ref _单次报销上限, value);
            }
        }

        public decimal 借款金额上限
        {
            get
            {
                return _借款金额上限;
            }
            set
            {
                SetPropertyValue("借款金额上限", ref _借款金额上限, value);
            }
        }



    }
}